/*
 * ConnectLabel.java
 * 
 * Created on 16.9.2007, 19:49:02
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.possoft.client.gui.panel.nastavenispodnipanel.components;

import java.awt.Color;
import javax.swing.JLabel;

import cz.possoft.messages.PropertiesManager;
import cz.possoft.messages.Text;

/**
 * Jednoduchy label ktery indikuje jestli jsme se pripojili a meni barvu modra/cervena 
 * 
 * @author mara
 */
public class ConnectLabel extends JLabel {
    
    public ConnectLabel(String text) {
        super(text);
        notConnected();
    }    
    
    // zmena pripojovaciho indikatoru, pokud jsme se prave pripojili k serveru
      public void connected() {
          setForeground(Color.RED);
          setText(PropertiesManager.getInstance().getMessageForKey(Text.CONNECTED));

      }
      
// zmena pripojovaciho indikatoru, pokud jsme se prave odpojili od serveru
      public void notConnected() {
          setForeground(Color.blue);
          setText(PropertiesManager.getInstance().getMessageForKey(Text.NOTCONNECTED));
      }      

}
